<%@ page language="java" pageEncoding="UTF-8" buffer="16kb"%>
<%@ include file="/base.jsp"%>
<%@ include file="/module/taglibs.jsp"%>
<%@ include file="/module/nocache.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<%@ include file="/module/js.jsp"%>
<%@ include file="/module/orderField.jsp"%>

<style>

table label.error {
    margin-left: 5px;
    width: auto;
    display: inline;
    color: red;
}


</style>
</head>
<body>
     <form action="#" name="Form" id="Form" method="post">
       <input type="hidden" name="zyid" id="zyid"  value="${data.zyid}"/>
		<table cellpadding="0" cellspacing="0" border="0" class="table-border" width="80%" >
			<tr >
				<td class="table-header" colspan="4" style="text-align: center;">业余团校作业情况</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 30%">团校期数:</td>
				<td class="table-contentTD">${data.dxqs}</td>
			</tr>
			
			 <tr>
				<td class="table-titleTD" style="width: 30%">创建人:</td>
				<td class="table-contentTD">${data.creatorname}</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 30%">创建时间:</td>
				<td class="table-contentTD"><fmt:formatDate value="${data.createtime}" pattern="yyyy-MM-dd"/></td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">状态:</td>
				<td class="table-contentTD">
				<c:if test="${data.state==0}">未提交</c:if>
				<c:if test="${data.state==1}">已提交</c:if>
				</td>
			</tr>
			<tr>
				<td class="table-titleTD" style="width: 15%">备注:</td>
				<td colspan="3" class="table-contentTD">${data.bz}</td>
			</tr>
			<tr>
				<td class="table-titleTD">附件：</td>
				<td class="table-contentTD" colspan="5">
					<table>
						<tr>
							<td colspan="2">
								<div id="uploadadd"></div>
							</td>
						</tr>
						<c:forEach items="${dataList}" var="datalist" varStatus="index">
							            <tr>
						                     <td>
									            [文件] ${datalist.filename}
									         </td>
									          <td>
									              <a href="${basePath}/DownLoadFileServlet?filename=${datalist.filename}&filepath=${datalist.filepath}">下载</a> 
					                          </td>
						                </tr>
						 </c:forEach>
					</table>
				</td>
			</tr>
		</table>
		</form>
		<br />
			
		<table cellpadding="1" cellspacing="1" border="0" align="left">
			<tr>
			    <c:if test="${data.state==0}">
			          <kl:permission permisstionList="${permisstionList}" currentUser="${_login_console_user}" currentCatalogId="<%=CatalogUtils.getCatalogId(\"ZHDJ_YYTX_ZYGL\")%>" key="modify">
			            <td><input type="button" id="btnSubmit" class="inputButton" style="text-align: center;" value="提交" /></td>
			            <td><input type="button" id="btnSave" class="inputButton" style="text-align: center;" value="修改" /></td>
			            </kl:permission>
				</c:if>
				 <td><input type="button" id="returnBut"  class="inputButton" value="返回"  style="text-align: center;"/></td>
			</tr>
		</table>
		<script>
		 
			$(document).ready(function() {
				  $("#btnSave").click(function() {
					   window.location.href ="${basePath}/communityAmateurHomework/updateToview?id="+ $("#zyid").val();
		 		  });
				  
				  $("#btnSubmit").click(function() {
				       window.location.href ="${basePath}/communityAmateurHomework/btnSubmit?id="+ $("#zyid").val();
			 	  });
				
				 $("#returnBut").click(function() {
		 			 window.location.href='${basePath}/communityAmateurHomework/index';
		 		 });
			});
		</script>
</body>
</html>
